Class symantec.itools.multimedia.NervousText
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.multimedia.NervousText

Object
   |
   +----Component
           |
           +----Canvas
                   |
                   +----symantec.itools.multimedia.NervousText

public class NervousText
extends Canvas
implements Runnable
NervousText control. Creates animated text in which each letter moves independently of all other letters.

Version:
1.0, Nov 26, 1996
Author:
Symantec

Constructor Index

 o symantec.itools.multimedia.NervousText()
Create defalut NervousText object.

Method Index

 o addNotify()
Tells this component that it has been added to a container.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all event changes.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a vetoable listener for all event changes.
 o getMinimumSize()
Returns the minimum dimensions to properly display this component.
 o getPreferredSize()
Returns the recommended dimensions to properly display this component.
 o getText()
Obtain the text that is currently being displayed.
 o hide()
Makes this component invisible.
 o isPaused()
Obtain animator's current state.
 o paint(Graphics)
Paints this component using the given graphics context.
 o pause(boolean)
 o removeNotify()
Tells this component that it is being removed from a container.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all event changes.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable listener for all event changes.
 o run()
NervousText thread body.
 o setPaused(boolean)
Temporarily suspend the animation of the nervous text.
 o setText(String)
Specify the text that will be displayed by NervousText.
 o show()
Makes this component visible.

Constructors

 o NervousText
public NervousText()
Create defalut NervousText object. Default object contains the word "text".

Methods

 o addNotify
public void addNotify()
Tells this component that it has been added to a container. This is a standard Java AWT method which gets called by the AWT when this component is added to a container. Typically, it is used to create this component's peer. It has been overridden here to start the nervous text thread.

Overrides:
addNotify in class Canvas
See Also:
removeNotify
 o addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all event changes.

Parameters:
PropertyChangeListener - listener the listener to add.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a vetoable listener for all event changes.

Parameters:
VetoableChangeListener - listener the listener to add.
See Also:
removeVetoableChangeListener
 o getMinimumSize
public java.awt.Dimension getMinimumSize()
Returns the minimum dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the recommended size of this component.

Returns:
10x10 per letter
Overrides:
getMinimumSize in class Component
 o getPreferredSize
public java.awt.Dimension getPreferredSize()
Returns the recommended dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the recommended size of this component.

Overrides:
getPreferredSize in class Component
 o getText
public java.lang.String getText()
Obtain the text that is currently being displayed.

Returns:
text that is being shown by this component
 o hide
public synchronized void hide()
Makes this component invisible. This is a standard Java AWT method which gets called to hide this component. A hidden component cannot be seen by the user nor does it take up space in its container, but it does continue to exist.

Overrides:
hide in class Component
See Also:
show
 o isPaused
public boolean isPaused()
Obtain animator's current state.

Returns:
true if the animator is paused, false if it is running
 o paint
public void paint(Graphics g)
Paints this component using the given graphics context. This is a standard Java AWT method which typically gets called by the AWT to handle painting this component. It paints this component using the given graphics context. The graphics context clipping region is set to the bounding rectangle of this component and its <0,0> coordinate is this component's top-left corner.

Parameters:
g - the graphics context used for painting
Overrides:
paint in class Canvas
See Also:
repaint, update
 o pause
public void pause(boolean f)
Note: pause() is deprecated.

See Also:
setPaused
 o removeNotify
public synchronized void removeNotify()
Tells this component that it is being removed from a container. This is a standard Java AWT method which gets called by the AWT when this component is removed from a container. Typically, it is used to destroy the peers of this component and all its subcomponents. It has been overridden here to stop the nervous text thread.

Overrides:
removeNotify in class Component
See Also:
addNotify
 o removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all event changes.

Parameters:
PropertyChangeListener - listener the listener to remove.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable listener for all event changes.

Parameters:
VetoableChangeListener - listener the listener to remove.
See Also:
addVetoableChangeListener
 o run
public void run()
NervousText thread body. This method is called by the Java virtual machine to when this thread starts.

 o setPaused
public void setPaused(boolean newIsPaused) throws PropertyVetoException
Temporarily suspend the animation of the nervous text. Identical to pause(boolean).

Parameters:
f - pause the animation of true
Throws: PropertyVetoException
if the specified property value is unacceptable
 o setText
public void setText(String newText) throws PropertyVetoException
Specify the text that will be displayed by NervousText.

Parameters:
str - text to be shown as nervous text
Throws: PropertyVetoException
if the specified property value is unacceptable
 o show
public synchronized void show()
Makes this component visible. This is a standard Java AWT method which gets called to show this component. If this component was invisible due to a previous hide() call it make this component visible again.

Overrides:
show in class Component
See Also:
hide

All Packages  Class Hierarchy  This Package  Previous  Next  Index